# 微信小程序环境变量设置脚本
# 运行此脚本设置微信小程序开发所需的环境变量

Write-Host "=== 设置微信小程序环境变量 ===" -ForegroundColor Green

# 设置微信小程序配置
$env:WECHAT_APPID="wx9d3d2db7e7c5707a"
$env:WECHAT_SECRET="5a80a8c58a63438ae2046c3d897d6121"

# 设置Flask环境
$env:FLASK_ENV="development"
$env:FLASK_DEBUG="true"

Write-Host "`n环境变量设置完成:" -ForegroundColor Yellow
Write-Host "WECHAT_APPID: $env:WECHAT_APPID" -ForegroundColor Green
Write-Host "WECHAT_SECRET: $env:WECHAT_SECRET" -ForegroundColor Green
Write-Host "FLASK_ENV: $env:FLASK_ENV" -ForegroundColor Green
Write-Host "FLASK_DEBUG: $env:FLASK_DEBUG" -ForegroundColor Green

Write-Host "`n✅ 环境变量设置成功！" -ForegroundColor Green
Write-Host "现在可以启动后端服务或运行测试脚本了。" -ForegroundColor Cyan

Write-Host "`n常用命令:" -ForegroundColor Yellow
Write-Host "启动后端服务: .\run.ps1" -ForegroundColor White
Write-Host "测试API: .\scripts\test_real_login.ps1" -ForegroundColor White
Write-Host "重新设置环境变量: .\scripts\set_env.ps1" -ForegroundColor White 